/**
 * @author Lxh
 * @version 2022.1.2
 * @date 2022/4/30 16:43
 */


public class TestDemo02 {
/*    public static void main(String[] args) {
        //1.动态初始化：创建数组时直接指定数组中元素个数
        int[] array = new int[10];
        //2.静态初始化：在创建数组时直接不指定数组元素个数，
        //而是将数组内容指定，编译器会自动确定数组长度
        int[] array1 = new int[]{0,2,3,4,6,7};
        //也可以简写一下，把后面的new int[]省略
        //这是因为编译器，编译时会把这个自动还原出来
        int[] array2 = {0,3,5,6,2,6,9};
    }*/
/*public static void main(String[] args) {
    int[] array1;
    array1 = new int[10];

    int[] array2;
    array2 = new int[]{4,6,2,8,9};
}*/
/*public static void main(String[] args) {
    int[] array = new int[]{10,20,30,40};
    System.out.println(array[0]);
    System.out.println(array[1]);
    System.out.println(array[2]);
    System.out.println(array[3]);
    System.out.println(array[4]);
    array[0]=100;
    System.out.println(array[0]);
}*/
/*public static void main(String[] args) {
    int[] array = new int[]{10,20,60,45,67};
    for(int i = 0;i<array.length;i++){
        System.out.println(array[i]);
    }
}*/
/*public static void main(String[] args) {
    int[] array = {1,56,23,45,88};
    for(int x:array){
        System.out.println(x);
    }
}*/
/*public static void main(String[] args) {
    int a = 18;
    int b = 88;
    int[] array = new int[]{1,56,2,51};
}*/
/*public static void func(String[] args) {
    int[] array1 = new int[3];
    array1[0] = 10;
    array1[1] = 20;
    array1[2] = 30;

    int[] array2 = new int[]{1,2,3,4,5};
    array2[0] = 100;
    array2[1] = 200;

    array1 = array2;
    array1[2] = 300;
    array1[3] = 400;
    array2[4] = 500;
    for (int i = 0; i < array2.length; i++) {
        System.out.println(array2[i]);
    }
}*/
public static void main(String[] args) {
    int[] arr = null;
    System.out.println(arr[0]);
}
}
